package com.work.common.ctx;

//TODO 需要添加自己定义的数据权限类
public class DataPermissionCtx {
    private static final ThreadLocal<String> ctxHolder = new ThreadLocal<>();

    public static void setDataPermission(String userId) {
        ctxHolder.set(userId);
    }

    public static String getDataPermission() {
        return ctxHolder.get();
    }

    public static void clear() {
        ctxHolder.remove();
    }
}
